package ck.com.api;

import ck.com.dto.Dto;
import ck.com.pojo.User;
import com.github.pagehelper.PageInfo;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;
import java.util.Map;

@RequestMapping("/user")
public interface UserApi {
    @RequestMapping("/selectUser")
    Dto<PageInfo<User>> selectUser(@RequestBody Map<String,Object> map);
    @RequestMapping("/add")
    Dto<Integer> add(@RequestBody User user);
    @RequestMapping("/selByUserName")
    Dto<User> selByUserName(@RequestParam("userName") String userName);
    @RequestMapping("/selByLoginName")
    Dto<User> selByLoginName(@RequestParam("loginName") String loginName);
    @RequestMapping("/selUrl")
    Dto<String> selUrl(@RequestParam("id") Integer id);
    @RequestMapping("/upd")
    Dto<Integer> upd(@RequestBody User user);
    @RequestMapping("/del")
    Dto<Integer> del(@RequestParam("id") Integer id);
}
